<style lang="scss" scoped>
.loader {
  height: 50px;
  width: 20rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;

  .dot {
    &-one,
    &-three {
      background-color: black;
      height: 30px;
      width: 20px;
      border-radius: 50%;
      text-align: center;
      animation: flap-wings 1s infinite ease-in-out;
      &::before,
      &::after {
        content: '';
        position: absolute;
        background-color: white;
      }
      &::before {
        height: 30px;
        width: 20px;
        top: 10px;
        left: 0;
        background-color: #fff;
        border-radius: 50% 50% 0 0;
      }
    }
    &-two {
      height: 30px;
      width: 30px;
      border-radius: 50%;
      padding: 4px;
      color: white;
      position: relative;
      height: 30px;
      width: 30px;
      border-radius: 50%;
      background-color: black;
      animation: flap-wings 1s infinite ease-in-out;
      animation-delay: 0.1s;
      &::before,
      &::after {
        content: '';
        position: absolute;
        background-color: black;
      }
      &::before {
        height: 20px;
        width: 10px;
        bottom: 20px;
        left: 1px;
        border-radius: 50% 50% 0 0;
        transform: rotate(-20deg);
      }

      &::after {
        height: 20px;
        width: 10px;
        bottom: 20px;
        left: 19px;
        transform: rotate(20deg);
        border-radius: 50% 50% 0 0;
      }
    }
  }
}

@keyframes flap-wings {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}
</style>

<template>
  <div class="loader">
    <div class="dot-one"></div>
    <div class="dot-two">- -</div>
    <div class="dot-three"></div>
  </div>
</template>
